﻿namespace doufu.Common
{
    public static class WebViewPageExtension
    {
        public static IUserIdentity GetUser(this System.Web.Mvc.WebViewPage page)
        {
            return page.User.Identity as IUserIdentity;
        }

        public static bool HasLogin(this System.Web.Mvc.WebViewPage page)
        {
            return page.User.Identity.IsAuthenticated;
        }
    }
}